Suggested in:
https://github.com/ostreedev/ostree/pull/3278#discussion_r1675696052
Signed-off-by: Daiki Ueno <dueno@redhat.com>
#include "otcore.h"
#include <libglnx.h>
#include <ot-checksum-utils.h>
+#include <string.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "OSTreeSign"
/* Clear secret key */
if (sign->secret_key != NULL)
{
- memset (sign->secret_key, 0, OSTREE_SIGN_ED25519_SECKEY_SIZE);
+ explicit_bzero (sign->secret_key, OSTREE_SIGN_ED25519_SECKEY_SIZE);
g_free (sign->secret_key);
sign->secret_key = NULL;
}